import { App } from 'vue';

import { permission } from '@/directives/permission';
import { loadmore } from '@/directives/loadmore';
import { autoFocus } from '@/directives/autoFocus';

/**
 * 注册全局自定义指令
 * @param app
 */
export function setupDirectives(app: App): void {
    // 权限控制指令
    app.directive('permission', permission);
    // autofocus
    app.directive('focus', autoFocus);
    // loadmore
    app.directive('loadmore', loadmore);
}
